import request from "../axios";
import utils from "../utils"
const varietyHttp = {
  varietyList(params) {
    return request.get('/variety/pageList', { params }
    )
  },
  varietyUpdate(data) {
    return request({
      method: 'post',
      url: '/variety/update',
      processData: false,
      contentType: false,
      // headers:{
      // 	'Content-type': 'multipart/form-data'
      // },
      data: utils.formData(data)
    })
  },
  addClass(data) {
    return request.post('/unit/addClass', data)
  },
  getClass(params) {
    return request.get('/unit/getClass', { params })
  },
  getPageClass(params) {
    return request.get('/unit/getPageClass', { params })
  },
  addNorm(data) {
    return request.post('/unit/addNorm', data)
  },
  getNorm(params) {
    return request.get('/unit/getNorm', { params })
  },
  getPageNorm(params) {
    return request.get('/unit/getPageNorm', { params })
  },
  getNormsTerm(params) {
    return request.get('/unit/getNormsTerm', { params })
  },
  addNormsTerm(params) {
    return request.get('/unit/addNormsTerm', { params })
  },
  deleteNormsTerm(params) {
    return request.get('/unit/deleteNormsTerm', { params })
  },
  addTable(data) {
    return request.post('/unit/addTable', data)
  },
  getPageTable(params) {
    return request.get('/unit/getPageTable', { params })
  },
  getUnit(params) {
    return request.get('/unit/getUnit', { params })
  },
  saveUnit(data) {
    return request.post('/unit/updateUnit', data)
  },
  getNewOrder(data) {
    return request.get('/unit/getNewOrder', data)
  }
}
export default varietyHttp